package com.yc.cinema;

import com.yc.cinema.biz.UserBiz;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

//@Configuration // ==> beans.xml
@ComponentScan("com.yc.cinema")
public class BeanConfig {

    @Bean(name="ubiz",initMethod = "init", destroyMethod = "destroy")
    @Scope("prototype")
    public UserBiz userBiz(){
        return userBiz();
    }
}
